
package com.hc.homestay.commons;

import java.util.List;

/**
 * 返回封装类
 * 用于返回给前端的
 * @author Administrator
 *
 */
public class ResultMap<T> {

	/**
	 * 返回的信息
	 */
	private String msg;
	
	/**
	 * 表格显示的数据
	 */
	
	private List<T> data;
	
	/**
	 * datagrid需要 默认0
	 */
	private int code;
	
	/**
	 * 查询到数据的总记录数 （datagrid需要）
	 */
	private int count;
	

	public ResultMap() {
	}

	public ResultMap(List<T> data, int count) {
		this.data = data;
		this.count = count;
	}

	public ResultMap(String msg, List<T> data, int code, int count) {
		this.msg = msg;
		this.data = data;
		this.code = code;
		this.count = count;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public List<T> getData() {
		return data;
	}

	public void setData(List<T> data) {
		this.data = data;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

}
